The present application relates to the field of communication technology and in particular, to a component of access control method and an electronic apparatus.
The Android operating system is an operating system of smart terminal based on Linux kernel. Each application of the Android operating system runs in java virtual machines separated from each other, each Android application corresponds to a plurality of components, and each component corresponds to one basic function in the operating system, such as messaging, network access, and so on. The Android application implements the access to the basic function in the operating system through the access of the component. Each Android application explicitly declares the component needed to be accessed by a file of AndroidManifest.xml. In the prior art, any Android application needs to apply for an access authority of the associated component as installing. Taking the Android applications installed in the mobile phone as example, the function of the component needed to be accessed includes sending and receiving messages, making phone calls, acquiring location services, and so on. The function corresponding to these components can be only used while the mobile phone operates after these components are applied for.
In prior art research, once the associated component of the Android application is applied for, it cannot be modified. Thus, some malicious applications can utilize the component communication mechanism to use various kinds of system component functions continuously (such as sending messages, making phone calls, acquiring location services, and so on), to cause the user privacy to be stolen and to cause an unstable running of the operating system. For example, a hacker may exploit a music player, and may apply for a component function of reading the message of the user. Once the user installs the application of the music player, the application can read all of the messages of the user and send them to a specified mailbox. The user cannot know that the privacy data has been illegally acquired, and the maliciously reading message would consume the system resources in the terminal, resulting in instability of the system running.